<template>
  <div class="header_box">
    <div class="user">用户名：{{ headerList.userName }}</div>
    <div>前端项目：v3+vite；接口：json-sever;UI库：element+echart；</div>
    <div>
      <el-button type="primary" plain @click="clickQuit">退出</el-button>
    </div>
  </div>
</template>
<script setup>
import { onBeforeMount, onMounted, reactive } from "vue";
const emit = defineEmits(["headerPorps"]); //子组件调用父组件的方法
const props = defineProps({
  headerList: {
    type: Object,
    default: () => {},
  },

  //   headerList: {
  //     type: Array,
  //     default: () => [],
  //   },
});
const clickQuit = () => {
  console.log(111);
  emit("headerPorps");
};

// const { proxy } = getCurrentInstance();
// const emits = defineEmits([]);
const state = reactive({});
onBeforeMount(() => {});
onMounted(() => {});
// defineExpose({ state });
</script> 
<style lang="scss" scoped>
.header_box {
  flex: 1;
  display: flex;

  justify-content: space-between;
}
.user {
  color: rgb(255, 132, 0);
}
</style>